package com.pan.api.config.impl;


import com.pan.api.config.*;
import com.pan.api.filter.ControllerFilter;
import com.pan.api.convert.PanInformationConvert;
import com.pan.api.format.PanFormat;

public enum PanApiDocConfig
        implements FilterControllerConfig,
        PanConvertConfig,
        PanFormatConfig,
        PathConfig, TitleConfig,
        AuthorConfig
{
    INSTANCE;

    {
        filterConfigUnit = FilterConfigUnit.INSTANCE;
        panConvertConfigUnit = PanConvertConfigUnit.INSTANCE;
        panFormatConfigUnit = PanFormatConfigUnit.INSTANCE;
        pathConfigUnit = PathConfigUnit.INSTANCE;
        titleConfigUnit = TitleConfigUnit.INSTANCE;
        authorConfigUnit = AuthorConfigUnit.INSTANCE;

    }
    private  FilterConfigUnit filterConfigUnit;
    private PanConvertConfigUnit panConvertConfigUnit;
    private PanFormatConfigUnit panFormatConfigUnit;
    private PathConfigUnit pathConfigUnit;
    private TitleConfigUnit titleConfigUnit;
    private AuthorConfigUnit authorConfigUnit;

    @Override
    public String getTitle() {
        return  titleConfigUnit.get();
    }

    @Override
    public void setTitle(String title) {
        titleConfigUnit.set(title);
    }

    @Override
    public void setPath(String path) {
        pathConfigUnit.set(path);
    }

    @Override
    public String getPath() {
        return  pathConfigUnit.get();
    }

    @Override
    public void setPanFormat(PanFormat panFormat) {
        panFormatConfigUnit.set(panFormat);
    }

    @Override
    public PanFormat getPanFormat() {
        return panFormatConfigUnit.get();
    }

    @Override
    public PanInformationConvert getPanConvert() {
        return panConvertConfigUnit.get();
    }

    @Override
    public void setPanConvert(PanInformationConvert panInformationConvert) {
        panConvertConfigUnit.set(panInformationConvert);
    }

    @Override
    public void setFilterController(ControllerFilter controllerFilter) {
        filterConfigUnit.set(controllerFilter);
    }

    @Override
    public ControllerFilter getFilterController() {
        return filterConfigUnit.get();
    }


    @Override
    public String getAuthor() {
        return AuthorConfig.super.getAuthor();
    }

    @Override
    public void setAuthor(String author) {
        AuthorConfig.super.setAuthor(author);
    }
}
